<template>
	<view class="content">
		<view class="center-head">
			<view class="my-head-left">
				<!-- <image src="../../static/DSC_46881.png" mode="aspectFill"></image> -->
				<open-data type="userAvatarUrl"></open-data>
			</view>
			<view class="my-head-text">
				<open-data class="grade-1" type="userNickName"></open-data>
				<!-- <text class="grade-2">ID:254587893</text> -->
			</view>
		</view>
		<view class="my-nava">
			<view class="my-nava-box">
				<view class="nava-box-list" v-for="(item,index) in mynav" :key="index" @click="mynavck(item.path)">
					<view class="nava-box-list-img"><image :src="item.src" mode="aspectFill"></image></view>
					<text>{{item.txt}}</text>
				</view>
			</view>
		</view>
		<view class="my-list">
			<view class="my-list-a" @click="details('联系客服')">
				<text>联系客服</text>
			</view>
			<view class="my-list-a" @click="faock()">
				<text>常见问题</text>
			</view>
			<view class="my-list-a" @click="details('协议与说明')">
				<text>协议与说明</text >
			</view>
			<view class="my-list-a" @click="details('关于我们')">
				<text>关于我们</text>
			</view>
			<view class="my-list-a" @click="tuigck()">
				<text>我的推广</text>
			</view>
		</view>
		<!-- <button type="default" class="dl-btn">退出登录</button> -->
		<dacizinavtag :current=item_index @click="tabClick"></dacizinavtag>
	</view>
</template>

<script>
	import dacizinavtag from '@/components/dacizi-navtag/dacizi-navtag.vue'
	export default {
	 components: {
			dacizinavtag,
		},
		data() {
			return {
				item_index:4,// 单页面id
				mynav:[
					{
						src:"../../static/items.png",
						"txt":"我的订单",
						path:'/pages/my/order'
					},
					{
						src:"../../static/items2.png",
						"txt":"待付款",
						path:'/pages/my/order?num='+1
					},
					{
						src:"../../static/items3.png",
						"txt":"售后管理",
						path:'/pages/my/order?num='+3
					},
					{
						src:"../../static/items4.png",
						"txt":"地址管理",
						path:'/pages/my/site'
					},
				],
			}
		},
		onLoad() {

		},
		methods: {
			getdingdan(){  //获取订单列表
				uni.request({
					url: getApp().globalData.http + '/order/getList',
					data: {
					},
					method: "post",
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'token': uni.getStorageSync('token')
					},
					success: res => {
						console.log(res);
					},
				})
			},
			mynavck(url){
				wx.navigateTo({
					url:url
				})	
			},	
			//全部订单
			qbdingdan(){
				wx.navigateTo({
					url:'/pages/my/order'
				})	
			},
			//待付款
			daifukuan(){
				wx.navigateTo({
					url:'/pages/my/order2'
				})	
			},
			//售后管理
			shouhck(){
				wx.navigateTo({
					url:'/pages/my/order4'
				})	
			},
			//地址管理
			dizigl(){
				wx.navigateTo({
					url:'/pages/my/site'
				})	
			},
			details(data){
				wx.navigateTo({
					url:'/pages/my/details?data=' + data
				})	
			},
			//常见问题
			faock(){
				wx.navigateTo({
					url:'/pages/my/fao'
				})	
			},
			//常见问题
			tuigck(){
				wx.navigateTo({
					url:'/pages/my/tuig'
				})	
			},
		}
	}
</script>
